<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <script>
        // let n = Math.random();//[0.0,1.0)
        // console.log(n);

        // //向下取整
        // console.log(Math.floor(-3.6));

        // console.log(parseInt(3.8));//3

        // //[1,100] - 整数
        // let m = parseInt(Math.random()*100+1);
        // console.log(m);

        // //[3,5]
        // let result = parseInt(Math.random()*3+3);
        // console.log(result);

        // 10 ^ 8 = 2

    //     1 0 1 0
    //     1 0 0 0 
    // ------------
    //     0 0 1 0 -> 2

    //     10 ^ 8 ^ 8 = 10

    //     0 0 1 0 
    //     1 0 0 0
    //     --------
    //     1 0 1 0  => 10


        let m = 20;
        let n = 10;
        //m = m ^ n;// m = 20 ^ 10
        //n = m ^ n;//n = 20 ^ 10 ^ 10 = 20
        //m = m ^ n;//m = 20 ^ 10 ^ 20 = 10

        //m = 10^20^20 = 10
        m = n^(n=m)^n;//编程之美

        console.log("m:"+m);
        console.log("n:"+n)
    </script>
</body>
</html>